package com.epam.edu.task02.Strings.textParts;

import java.util.Comparator;

public class SortedSentences implements Comparator<Sentence> {

	public int compare(Sentence o1, Sentence o2) {
		double numberofword1 = o1.getNumberofword();
		double numberofword2 = o2.getNumberofword();
		return (numberofword1 < numberofword2) ? 1
				: ((numberofword1 > numberofword2) ? -1 : 0);
	}
}
